package ar.edu.itba.it.cg.grupo01.impl.image;

import java.awt.Color;
import java.awt.image.BufferedImage;

import ar.edu.itba.it.cg.grupo01.api.image.Image;

public class ImageImpl implements Image {

	private int w;
	private int h;
	private BufferedImage bi;
	
	public ImageImpl(int width, int height, int typeIntRgb) {
		this.w = width;
		this.h = height;
		this.bi = new BufferedImage(w, h, typeIntRgb);
		
	}

	@Override
	public int getHeight() {
		return h;
	}

	@Override
	public int getWidth() {
		return w;
	}

	@Override
	public BufferedImage getBufferedImage() {
		return bi;
	}

	@Override
	public void setPixel(int x, int y, Color color) {
		bi.setRGB(y, x, color.getRGB());
	}

}
